using System;
using System.Data;
using System.ComponentModel;
using System.Reflection;
using System.Collections.Generic;

namespace VSSTQH
{
	public partial class UserMapper
	{

		#region Methods With Relation

		public static UserModel ToModel(User entity)
		{
			if (entity == null)
			{
				return null;
			}
			UserModel model = new UserModel();
			model.Fullname = entity.Fullname;
			model.GroupID = entity.GroupID;
			model.GroupName = entity.GroupName;
			model.Password = entity.Password;
			model.Username = entity.Username;
            model.Active = entity.Active;
			return model;
		}
		public static User ToEntity(User entity, UserModel model)
		{
			if (model == null)
			{
				return null;
			}
			entity.Fullname = model.Fullname;
			entity.GroupID = model.GroupID;
			entity.GroupName = model.GroupName;
			entity.Password = model.Password;
			entity.Username = model.Username;
            entity.Active = model.Active;
			return entity;
		}

		#endregion

	}
}
